<?php get_header(); ?>

<?php

$cust_sliderimgs_array = get_option('arc_homepage_slider_photos');

//Explode images URL
$cust_sliderimgs = explode("\n", $cust_sliderimgs_array);

?>

<?php if(!empty($cust_sliderimgs_array)){ ?>
<!-- Slider Script -->
<script type="text/javascript">

	function showarrows(){
		$('.nivo-directionNav').show();
	}
	
	function hidearrows(){
		$('.nivo-directionNav').hide();
	}
	
	$(window).load(function() {
		$('#slider1').nivoSlider({
			effect: '<?php echo get_option('arc_homepage_slider_effect'); ?>', // Specify sets like: fold,fade,sliceDown
			slices: 15, // For slice animations
			animSpeed: 1000, // Slide transition speed
			pauseTime: <?php echo get_option('arc_homepage_slider_speed'); ?>, // How long each slide will show
			startSlide: 0, // Set starting Slide (0 index)
			directionNav: <?php echo get_option('arc_homepage_slider_directionnav'); ?>, // Next & Prev navigation
			directionNavHide: true, // Only show on hover
			controlNav: <?php echo get_option('arc_homepage_slider_controlnav'); ?>, // 1,2,3... navigation
			controlNavThumbs: false, // Use thumbnails for Control Nav
			controlNavThumbsFromRel: false, // Use image rel for thumbs
			keyboardNav: true, // Use left & right arrows
			pauseOnHover: true, // Stop animation while hovering
			manualAdvance: false, // Force manual transitions
			captionOpacity: false, // Universal caption opacity
			prevText: false, // Prev directionNav text
			nextText: false, // Next directionNav text
		});
	});
</script>
<?php } ?>

<!-- start Content Home -->				
<div class="content">

<div class="slideimg">
	<div class="slideprojects theme-default">
		<!-- SLIDER IMAGES -->
		<?php if(!empty($cust_sliderimgs_array)){ ?>
		<div id="slider1" class="nivoSlider">
			<?php for($i=0; $i<count($cust_sliderimgs); $i++){ 
							if($i < count($cust_sliderimgs) - 1)
								$cust_src = substr($cust_sliderimgs[$i], 0, -1);
							else
								$cust_src = $cust_sliderimgs[$i];
			?>
			<img alt="" src="<?php echo $cust_src; ?>" style="opacity: 1; filter:alpha(opacity=100);" />


			<?php } ?>
		</div>
		<?php } ?>
	</div>
	
	<!-- Page Content -->
	<div style="position:absolute; left: 30px; margin-top: 25px;" class="main_content" onmouseenter="showarrows();" onmouseover="showarrows();" onmouseleave="hidearrows();" onmouseout="hidearrows();">
		<div class="slogan">
				<?php
					$slogan1 = get_option('arc_homepage_slogan_text1');
					if(!empty($slogan1)){
				?>
				<div class="slogan1">
							<p><span><?php echo $slogan1; ?></span></p>
						</div>
				<?php } ?>
						
				<?php
					$slogan2 = get_option('arc_homepage_slogan_text2');
					if(!empty($slogan2)){
				?>
						<div class="slogan2">
							<p><span><?php echo $slogan2; ?></span></p>
						</div>
					<?php } ?>	
						
					</div>
	</div>
</div>
	<input type="hidden" id="is_homepage" value="yes"/>
		<div class="hidecorner"></div>
		
		</div>	
	</div>	
</div>

<?php get_footer(); ?>